import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import App from '@/App.vue'

const routes = [
  {
    path: '/',
    name: 'app',
    component: App,
    redirect: '/cover',
    children: [
      {
        path: '/cover',
        name: 'Cover',
        component: () => import('../views/cover.vue')
      },
      {
        path: '/login',
        name: 'Login',
        component: () => import('../views/login.vue')
      },
      {
        path: '/register',
        name: 'Register',
        component: () => import('../views/register.vue')
      },
      {
        path: '/search',
        name: 'Search',
        component: () => import('../views/search.vue')
      },
      {
        path: '/screening',
        name: 'Screening',
        component: () => import('../views/screening.vue')
      },
      {
        path: '/merchandiseDetail',
        name: 'merchandiseDetail',
        component: () => import('../views/merchandiseDetail.vue')
      },
      {
        path: '/videoDetail',
        name: 'videoDetail',
        component: () => import('../views/videoDetail.vue')
      },
      {
        path: '/home',
        name: 'Home',
        component: () => import('../views/home.vue'),
        children: [
          {
            path: '/home',
            name: 'Home',
            component: () => import('../views/home/index.vue'),
          },
          {
            path: '/customerService',
            name: 'CustomerService',
            component: () => import('../views/home/customerService.vue')
          },
          {
            path: '/distribution',
            name: 'Distribution',
            component: () => import('../views/home/distribution.vue')
          },
          {
            path: '/stoneIsland',
            name: 'stoneIsland',
            component: () => import('../views/home/stoneIsland.vue')
          },
          {
            path: '/screen',
            name: 'screen',
            component: () => import('../views/home/screen.vue')
          },
          {
            path: '/shadowProject',
            name: 'shadowProject',
            component: () => import('../views/home/shadowProject.vue')
          },
          {
            path: '/brand',
            name: 'brand',
            component: () => import('../views/home/brand.vue')
          },
          {
            path: '/brandConcept',
            name: 'brandConcept',
            component: () => import('../views/home/brandConcept.vue')
          },
          {
            path: '/InDepthBrand',
            name: 'InDepthBrand',
            component: () => import('../views/home/InDepthBrand.vue')
          },
          {
            path: '/sanlitun',
            name: 'sanlitun',
            component: () => import('../views/home/sanlitun.vue')
          },
          {
            path: '/unknown',
            name: 'unknown',
            component: () => import('../views/home/unknown.vue')
          },
        ]
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
